<?php
/**
 * 定义工厂接口
 */
interface Product
{
    public function show();
}

class ProductA implements Product
{
    public function show()
    {
        echo "Show ProductA";
    }
}

class ProductB implements Product
{
    public function show()
    {
        echo "Show ProductB";
    }
}